$border-color: #dcdee0;
$border-style: 1px solid $border-color;
$search-height: 80px;
$body-height: 500px;

/deep/ {
  .el-dialog__header {
    border-bottom: $border-style;
    margin-top: -1px;
  }
  .el-dialog__body {
    padding-top: 10px;
    padding-bottom: 10px;
    height: $body-height;
    overflow: hidden;
    box-sizing: border-box;
  }
  .el-dialog__footer {
    border-top: 1px solid $border-color;
    margin-bottom: -1px;
  }
}
.shop-picker__dialog {
  &-body {
    display: flex;
    position: relative;
    flex-direction: column;
    margin-bottom: 10px;
    min-height: $body-height;
    font-size: 12px;
    line-height: normal;
  }
  &-search {
    position: relative;
    width: 100%;
  }
  &-content {
    display: flex;
    justify-content: space-between;
    position: relative;
    width: 100%;
    height: $body-height - $search-height - 10px;
    margin-top: 10px;
    .load-more {
      width: 100%;
      margin-bottom: 10px;
    }
  }
  &-list {
    position: relative;
    width: 49%;
    height: 100%;
    padding: 10px 10px 0 10px;
    background-color: #fafafa;
    overflow-x: hidden;
    overflow-y: auto;
  }
  &-empty {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    font-size: 16px;
  }
  &-item {
    display: flex;
    float: left;
    position: relative;
    width: 49%;
    height: 80px;
    margin-bottom: 10px;
    background-color: #fff;
    border-radius: 2px;
    overflow: hidden;
    &::after {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
      border: $border-style;
      border-radius: 2px;
    }
    &:nth-child(2n) {
      margin-left: 2%;
    }
    &-image,
    &-image-place {
      width: 110px;
      height: 80px;
      flex-shrink: 0;
      background-size: contain;
      background-position: 50%;
      background-repeat: no-repeat;
    }
    &-image-place {
      background-size: 64px 64px;
      background-image: url('');
      background-color: #eeeeee;
    }
    &-other {
      width: calc(100% - 70px);
      padding: 5px;
      overflow: hidden;
      .shop-name {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        -webkit-box-orient: vertical;
      }
    }
    &:hover:not(.slide-fade-move) .shop-picker__dialog-item-mask {
      display: flex
    }
    &-mask {
      display: none;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 99;
      cursor: pointer;
      .mask-view, .mask-check {
        position: relative;
        float: left;
        height: 100%;
        background-color: rgba(204, 204, 204, 0.5);
        transition: all ease-out 0.3s;
        &:hover { background-color: #ccc }
        i {
          display: block;
          position: absolute;
          top: 50%;
          left: 50%;
          margin-top: -15px;
          margin-left: -15px;
          width: 30px;
          height: 30px;
          transition: all ease-out 0.3s;
        }
      }
      .mask-view {
        flex-shrink: 0;
        width: 40px;
        a {
          display: block;
        }
        i {
          background: url("") no-repeat center;
          background-size: 100%;
        }
      }
      .mask-check {
        flex: 1;
        i {
          background: url("") no-repeat center;
          background-size: 100%;
        }
      }
    }
    &-icon-selected {
      display: none;
      position: absolute;
      top: 0;
      right: 0;
      width: 25px;
      height: 25px;
      background: url("") no-repeat center #fff;
      background-size: 100%;
      z-index: 99;
    }
    &.selected {
      .shop-picker__dialog-item-icon-selected { display: block }
      .mask-check {
        background-color: #f23f40;
        i {
          background: url("") no-repeat center;
          background-size: 100%;
        }
      }
    }
  }
  &-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    &-num {
      font-size: 14px;
      span {
        color: red;
        margin-right: 10px;
      }
    }
  }
}

/** 动画 */
.slide-fade-item, .slide-fade-enter-active, .slide-fade-leave-active {
  transition: all .5s ease;
}
.slide-fade-enter, .slide-fade-leave-to {
  transform: translateX(-30px);
  opacity: 0;
}
.slide-fade-leave-active {
  position: absolute;
}
.slide-fade-move {
  transition: transform .5s;
}
